package com.sc.nft.controller;

import com.sc.nft.annotation.SysMemberLogin;
import com.sc.nft.entity.vo.MallActivityRankingCyclesVO;
import com.sc.nft.service.MallActivityRankingCyclesService;
import com.sc.nft.sup.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/activity/ranking/cycles")
@Api(tags = "活动排行榜（周期）模块")
public class ActivityRankingCyclesController {

    private final MallActivityRankingCyclesService mallActivityRankingCyclesService;

    @PostMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "周期列表", notes = "周期列表", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @SysMemberLogin
    public Result<List<MallActivityRankingCyclesVO>> queryActivityRankingCyclesList() {
        List<MallActivityRankingCyclesVO> mallActivityRankingCyclesVOList = mallActivityRankingCyclesService.queryActivityRankingCyclesList();
        return Result.success(mallActivityRankingCyclesVOList);
    }
}
